#include<STC15F2K60S2.H>
#include "LCD1602.h"
#include "Delay.h"
#include "MatrixKey.h"
unsigned char KeyNum;
void cls(void)
{
	P2=(P2&0X1F)|0X80;
	P0=0XFF;
	P2&=0X1F;
	
}
void main(void)
{
	
	LCD_Init();
	cls();
	LCD_ShowString(1,1,"Number:");
	while(1)
	{
		KeyNum=MatrixKey();
		if(KeyNum)
		{
			LCD_ShowNum(2,1,KeyNum,2);
		}
		
	}
	
}